home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / sprite / mainHook.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-25  |  3.2 KB  |  114 lines

  1. /* 
  2.  * mainHook.c --
  3.  *
  4.  *    Definitions to modify the behavior of the main routine.
  5.  *
  6.  * Copyright 1986 Regents of the University of California
  7.  * All rights reserved.
  8.  */
  9.  
  10. #ifndef lint
  11. static char rcsid[] = "$Header: /sprite/src/kernel/sprite/RCS/mainHook.c,v 5.8 91/10/25 11:25:12 shirriff Exp $ SPRITE (Berkeley)";
  12. #endif not lint
  13.  
  14. #include "sprite.h"
  15. #include "main.h"
  16.  
  17. /*
  18.  * Flags to modify main's behavior.   Can be changed without recompiling
  19.  * by using adb to modify the binary.
  20.  */
  21.  
  22. Boolean main_Debug     = FALSE; /* If TRUE then enter the debugger */
  23. Boolean main_DoProf     = FALSE; /* If TRUE then start profiling */
  24. Boolean main_DoDumpInit    = TRUE; /* If TRUE then initialize dump routines */
  25. int main_NumRpcServers    = 2;     /* # of rpc servers to create */
  26. char *main_AltInit    = NULL;  /* If non-null then contains name of
  27.                   * alternate init program to use. */
  28. Boolean main_AllowNMI = FALSE;     /* TRUE -> allow non-maskable intrrupts */
  29.  
  30. #ifdef notdef
  31. /*
  32.  * Malloc/Free tracing.  This array defines which object sizes will
  33.  * be traced by malloc and free.  They'll record the caller's PC and
  34.  * the number of objects it currently has allocated.  The sizes reflect
  35.  * the 8 byte granularity of the memory allocator, plus the 16 bytes
  36.  * of overhead on each bin.
  37.  */
  38. #include "fs.h"
  39. #include "fsPdev.h"
  40. #include "fsDisk.h"
  41. #include "fsDevice.h"
  42. #include "fsFile.h"
  43. Mem_TraceInfo mainMemTraceInfo[] = {
  44.     { 24, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  45.     { 32, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  46.     { 40, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  47.     { 48, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  48.     { 56, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  49.     { 64, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  50.     { 72, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  51.     { 80, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  52.     { 88, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  53.     { 96, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  54.     { 112, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  55.     { sizeof(FsFileDescriptor), (MEM_STORE_TRACE) },
  56.     { 144, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  57.     { sizeof(FsDeviceIOHandle), (MEM_STORE_TRACE) },
  58.     { sizeof(PdevControlIOHandle), (MEM_STORE_TRACE) },
  59.     { 216, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  60.     { sizeof(PdevServerIOHandle), (MEM_STORE_TRACE) },
  61.     { sizeof(FsRmtFileIOHandle), (MEM_STORE_TRACE) },
  62.     { sizeof(FsLocalFileIOHandle), (MEM_STORE_TRACE) },
  63. };
  64. #endif
  65.  
  66. /*
  67.  *----------------------------------------------------------------------
  68.  *
  69.  * Main_HookRoutine --
  70.  *
  71.  *    A routine called by main() just before the init program
  72.  *    is started.
  73.  *
  74.  * Results:
  75.  *    None.
  76.  *
  77.  * Side effects:
  78.  *    
  79.  *
  80.  *----------------------------------------------------------------------
  81.  */
  82.  
  83. void
  84. Main_HookRoutine()
  85. {
  86. #ifdef notdef
  87.     Mem_SetTraceSizes(sizeof(mainMemTraceInfo) / sizeof(Mem_TraceInfo),
  88.             mainMemTraceInfo);
  89. #endif
  90. }
  91.  
  92.  
  93. /*
  94.  *----------------------------------------------------------------------
  95.  *
  96.  * Main_InitVars --
  97.  *
  98.  *    A routine called by main() before it does anything.  Can only be used
  99.  *    to initialize variables and nothing else.
  100.  *
  101.  * Results:
  102.  *    None.
  103.  *
  104.  * Side effects:
  105.  *    
  106.  *
  107.  *----------------------------------------------------------------------
  108.  */
  109. void
  110. Main_InitVars()
  111. {
  112. }
  113.  
  114.